package com.xiaoshuidi.cloud.module.member.enums;

public enum AppIndexPageItemEnum {
    BANNER(1, "首页banner"),
    SERVICE_PHONE(2, "服务电话"),
    RECOMMEND(3, "推荐位"),
    RESOURCE(4, "房源推荐")
    ;

    private Integer index;
    private String item;

    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    AppIndexPageItemEnum(Integer index, String item) {
        this.item = item;
        this.index = index;
    }

    public static AppIndexPageItemEnum getEnumByIndex(Integer index){
        for(AppIndexPageItemEnum en : AppIndexPageItemEnum.values()){
            if(en.getIndex().equals(index)){
                return en;
            }
        }
        return null;
    }
}
